<!--    <font color="#9ACD32"><b>该笔订单支付金额为<span style="color:#f00;font-size:50px">{$order_price}</font><br/><br/>-->
<!--    <div align="center">-->
<!--        <button style="width:210px; height:50px; border-radius: 15px;background-color:#FE6714; border:0px #FE6714 solid; cursor: pointer;  color:white;  font-size:16px;" type="button" onclick="callpay()" >立即支付</button>-->
<!--    </div>-->
    <script type="text/javascript">
        //调用微信JS api 支付
        callpay();
        function jsApiCall()
        {
            WeixinJSBridge.invoke(
                'getBrandWCPayRequest',
                {$jsApiParameters|raw},
                function(res){
                    WeixinJSBridge.log(res.err_msg);//+res.err_desc+res.err_msg

                    if(res.err_msg == "get_brand_wcpay_request:ok"){

                        window.location.href = "{:url('Order/distribution')}?order_number={:input('order_number')}";
                    }else if (
                        res.err_msg == "get_brand_wcpay_request:cancel" ||
                        res.err_msg == "get_brand_wcpay_request:fail"
                    ) {
                        // 不处理

                    }else{
                         alert(res.code+res.err_desc+res.err_msg);
                    }
                }
            );
        }

        function callpay()
        {
            if (typeof WeixinJSBridge == "undefined"){
                if( document.addEventListener ){
                    document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
                }else if (document.attachEvent){
                    document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                    document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
                }
            }else{
                jsApiCall();
            }
        }
    </script>


<body>

</body>
</html>